<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "biad_post".
 *
 * @property integer $postid
 * @property integer $listorder
 * @property integer $forumid
 * @property string $subject
 * @property string $username
 * @property integer $datetime
 * @property integer $anonymous
 * @property integer $invisible
 * @property string $tags
 * @property integer $comments
 * @property integer $follows
 * @property integer $views
 * @property string $content
 * @property string $images
 * @property integer $userid
 * @property string $linkurl
 */
class Post extends \base\BaseActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'biad_post';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['listorder', 'forumid', 'datetime', 'anonymous', 'invisible', 'comments', 'follows', 'views', 'userid'], 'integer'],
            [['content'], 'string'],
            [['subject', 'tags'], 'string', 'max' => 150],
            [['username'], 'string', 'max' => 50],
            [['images', 'linkurl'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'postid' => 'Postid',
            'listorder' => 'Listorder',
            'forumid' => 'Forumid',
            'subject' => 'Subject',
            'username' => 'Username',
            'datetime' => 'Datetime',
            'anonymous' => 'Anonymous',
            'invisible' => 'Invisible',
            'tags' => 'Tags',
            'comments' => 'Comments',
            'follows' => 'Follows',
            'views' => 'Views',
            'content' => 'Content',
            'images' => 'Images',
            'userid' => 'Userid',
            'linkurl' => 'Linkurl',
        ];
    }
}
